<%--
Draws the top navigation

--%>
<%@include file="/libs/foundation/global.jsp"%><%
%><%@ page import="java.util.Iterator,
        com.day.text.Text,
        com.day.cq.wcm.api.PageFilter,
        com.day.cq.wcm.api.Page,
        com.day.cq.commons.Doctype,
        org.apache.commons.lang.StringEscapeUtils" %>
<div style="clear:both"></div>
<div id="insideMenu">
    <ul id="navigation-a">
    <%
    // get pages from the dialog.
    
    String[] pages = properties.get("pages",String[].class);
    
    // Check if the pages array is not null
    if(pages != null) {
        
        // For each page in the array, display the Title.
        for(int i=0; i<pages.length; i++) {
        
            // Use the page manager to get the page node.
            Page p = pageManager.getPage(pages[i]);
            
            //Output the title!
            %><li><a href="<%=p.getPath()%>.html" target="_self"><span></span><%=p.getTitle() %></a></li>
            &nbsp;&nbsp;&nbsp;
            <%             
            
        } 
    }
    else {
        %> Configure the top nav <%
    }
    %>
    </ul>
    <br/>
</div>
<div style="clear:both"></div>